//
//  IMMessage.h
//  IMSecurity
//
//  Created by infosec2013 on 2017/12/24.
//  Copyright © 2017年 IF. All rights reserved.
//

#import <Foundation/Foundation.h>
@class IMUser;

typedef NS_ENUM(NSInteger,MessageOptType){
    MessageOptTypeInternertLink = 1,
    MessageOptTypeThirdApp,
    MessageOptTypeCurApp
};



@interface IMMessage : NSObject
//应用编号
@property(nonatomic, strong)NSString *appId;
//应用名称
@property(nonatomic, strong)NSString *appName;
//消息内容
@property(nonatomic, strong)NSString *msg;
//跳转地址
@property(nonatomic, strong)NSString *url;
//点击后的操作 1.打开链接  2.打开第三方应用 3.本应用内打开
@property(nonatomic, strong)NSNumber *operationType;
//状态代码
@property(nonatomic, strong)NSNumber * statusCode;
//状态名称
@property(nonatomic, strong)NSString *statusName;
//图标地址
@property(nonatomic, strong)NSString *icon;
//更新时间
@property(nonatomic, strong)NSString *updateTime;

@property(nonatomic,strong)NSString *businesscode;
@property(nonatomic,strong)NSString *random;

@property(nonatomic, strong)NSString *infotype;

/**
 获取待办消息列表

 @param username 用户名
 @param itemlimit 消息条数，0表示获取所有消息
 */
+ (void)getTodoListWithUsername:(NSString *)username
                      itemlimit:(int)itemlimit
                completionBlock:(void(^)(int resultCode, NSArray *arrayMsg))completionBlock;

/**
 获取浏览消息列表
 
 @param username 用户名
 @param itemlimit 消息条数，0表示获取所有消息
 */
+ (void)getMsgListWithUsername:(NSString *)username
                     itemlimit:(int)itemlimit
               completionBlock:(void(^)(int resultCode, NSArray *arrayMsg))completionBlock;

/**
 获取所有消息列表
 
 @param username 用户名
 @param itemlimit 消息条数，0表示获取所有消息
 */
+ (void)getAllMsgListWithUsername:(NSString *)username
                        itemlimit:(int)itemlimit
                  completionBlock:(void(^)(int resultCode, NSArray *arrayMsg))completionBlock;
@end
